// optional reimplementation to use Mission event loop
// Copyright 2006 (C) Ralph Thomas

#ifndef MISSION_VIEW_OPTIONAL_H
#define MISSION_VIEW_OPTIONAL_H

#include <factory.hpp>

namespace view {
	//
	/// The optional widget is a functional copy of Adobe's
	/// original optional widget (in ui-core) that uses the
	/// Mission event system to trigger relayout. This solves
	/// some problems with the Adobe optional widget (that
	/// are unique to the Mission environment).
	///
	/// The "bind" parameter should return a boolean for showing
	/// and hiding this optional view.
	///
	/// \param	parameters	a dictionary of parameters.
	/// \param	parent		the parent of this optional.
	/// \param	token		the factory token.
	/// \return	a widget_node_t containing this optional.
	//
	adobe::widget_node_t optional_factory(
		const adobe::dictionary_t&	parameters,
		const adobe::widget_node_t&	parent,
		const adobe::factory_token_t&	token );
};

#endif

